Dependent Coercions
نویسندگان
چکیده
A notion of dependent coercion is introduced and studied in the context of dependent type theories. It extends our earlier work on coercive subtyping into a uniform framework which increases the expressive power with new applications. A dependent coercion introduces a subtyping relation between a type and a family of types in that an object of the type is mapped into one of the types in the family. We present the formal framework, discuss its meta-theory, and consider applications such as its use in functional programming with dependent types.
منابع مشابه
Coercions in a polymorphic type system
The idea of coercive subtyping, a theory of abbreviation for dependent type theories, is incorporated into the polymorphic type system in functional programming languages. The traditional type system with let-polymorphism is extended with argument coercions and function coercions, and a corresponding type inference algorithm is presented and proved to be sound and complete.
متن کاملFormalization of Coercions in Lexical Semantics
Originally developed for use in programming languages with simple type systems (see, for example, [22]), coercions between types, including many subtypes of the type of entities (eventualities, physical objects, informational objects, etc.), have been widely employed in linguistic semantics [26, 30, 28, 3]. There are, however, two problems with coercions. First, it has been unclear how coercion...
متن کاملThe Good, the Bad, and the Ugly: An Empirical Study of Implicit Type Conversions in JavaScript
Most popular programming languages support situations where a value of one type is converted into a value of another type without any explicit cast. Such implicit type conversions, or type coercions, are a highly controversial language feature. Proponents argue that type coercions enable writing concise code. Opponents argue that type coercions are error-prone and that they reduce the understan...
متن کاملSubset Coercions in Coq
We propose a new language for writing programs with dependent types which can be elaborated into partial Coq terms. This language permits to establish a phase distinction between writing and proving algorithms in the Coq environment. Concretely, this means allowing to write algorithms as easily as in a practical functional programming language whilst giving them as rich a specification as desir...
متن کاملExtending System Fη with Abstraction over Erasable Coercions
Erasable coercions in System Fη, also known as retyping functions, are well-typed η-expansions of the identity. They may change the type of terms without changing their behavior and can thus be erased before reduction. Coercions in Fη can model subtyping of known types and some displacement of quanti ers, but not subtyping assumptions nor certain form of delayed type instantiation. We generaliz...
متن کاملDynamic Translucency with Abstraction Kinds and Higher-Order Coercions
When a module language is combined with forms of non-parametric type analysis, abstract types require an opaque dynamic representation in order to maintain abstraction safety. As an idealisation of such a module language, we present a foundational calculus that combines higher-order type generation, modelling type abstraction, with singleton kinds, modelling translucency. In this calculus, type...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Electr. Notes Theor. Comput. Sci.
دوره 29 شماره
صفحات -
تاریخ انتشار 1999